<?php
/**
 * GoodsCategoryModel.php
 * Created by PhpStorm.
 * User: 江小波
 * Date: 2019/5/10
 * Time: 14:48
 */
namespace app\api\model;

use app\common\RecursiveTrait;
use app\common\Singleton;
use think\Db;

class GoodsCategoryModel
{
    use Singleton,RecursiveTrait;

    public function getAll()
    {
        $all = Db::name('goods_category')
            ->where('is_enable',1)
            ->order('sort','asc')
            ->select();
        return self::recursive($all);
    }

}